package xutils

import (
	"net/http"
	"net/url"
)

func Request(r *http.Request) url.Values {
	if r.Method == http.MethodGet {
		return r.URL.Query()
	}

	var values url.Values
	if r.Method == http.MethodPost {
		values = r.URL.Query()
		form := r.Form
		for k, v := range form {
			values[k] = v
		}
	}

	return values
}
